//
//  ViewController.swift
//  构建者模式_ORM_SWIFT
//
//  Created by macOS on 2017/4/22.
//  Copyright © 2017年 macOS. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
//        
//        let selectSQLBuidler = DM_SQLSelectBuilder()
//        
//        var wh = [String : Any]()
//        wh["t_id"] = 1
//        wh["t_name"] = "wsj"
        
//        let sql = selectSQLBuidler.select().all().from().talbe("t_user").wh().whAndFormat(wh).builder()
        
//        print(sql)
        
        //方式二:
        
//      
//        let sql2 =  selectSQLBuidler.selectAllFromTableWhere(table: "abc_suer", wh: wh, orderBy: "t_name").builder()
//        print(sql2)
        
//        let insertSql = DM_SQLInsertBuilder().insert().into().talbe("abcd_user").colums(["t_id", "t_name"]).wsj_values([1, "wsj2012"]).builder()
//        
//        print(insertSql)
        
//        let b_insertSql = DM_SQLInsertBuilder().insert().into().talbe("abcd_user").colums(["t_id", "t_name","t_age"]).wsj_batckValues([[1,"wsj2012"],[2,"jack"],[3,"david"]]).builder()
//        print(b_insertSql)
        
        
        
//        let ormInsert = DM_OrmSQLIndertBuilder().insertIntoTableOrm(orm: <#T##DM_Orm#>, user: <#T##DM_User#>)
        
        
        
        //let dao = DM_BaseDao<DM_User>()
        //let user = DM_User()
        //user.userId = 1
        //user.userName = "wsj2012"
        //user.userAge = 18
        //let result = dao.insert(obj: user)
        //print("结果\(result)")
        
        DM_TemplateConfig.sharedInstace.initXml()
        
        let helper = DM_OrmSQLOpenHelper()
        
        
        
        
    }

   
   
}

